﻿using System;
using System.Collections.Generic;
using System.Web;

/// <summary>
///ImportantFansProxy 的摘要说明
/// </summary>
public class ImportantFansProxy
{
	public ImportantFansProxy()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}

    public object Add(string weiboId, string fansId)
    {
        DBImportantFans db = new DBImportantFans();
        ImportantFansData user = db.Select(weiboId, fansId);
        if (user == null)
        {
            db.Add(weiboId, fansId);
            return db.Select(weiboId, fansId);
        }
        else
            return "帐号已经是重点粉丝";
    }

    public object Delete(string weiboId, string fansId)
    {
        DBImportantFans db = new DBImportantFans();
        ImportantFansData user = db.Select(weiboId, fansId);
        if (user == null)
        {
            return "帐号不是重点粉丝";
        }
        else
        {
            db.Delete(weiboId, fansId);
            return user;
        }
    }

    public List<ImportantFansData> SelectList(string weiboId)
    {
        DBImportantFans db = new DBImportantFans();
        return db.SelectList(weiboId);
    }
}